

ASM_SRCS+=Ports/os_cpu_a.s
SRCS+=Ports/os_cpu_c.c
SRCS+=Ports/os_dbg.c
SRCS+=Source/os_core.c
SRCS+=Source/os_flag.c
SRCS+=Source/os_mbox.c
SRCS+=Source/os_mem.c
SRCS+=Source/os_mutex.c
SRCS+=Source/os_q.c
SRCS+=Source/os_sem.c
SRCS+=Source/os_task.c
SRCS+=Source/os_time.c
SRCS+=Source/os_tmr.c
	
OBJS=$(patsubst  %.c, %.o, $(SRCS))
ASM_OBJS+=$(patsubst  %.s, %.o, $(ASM_SRCS))

libos.a:$(OBJS) $(ASM_OBJS)
	@$(AR) cr $@ $^
	cp $@ $(LIB_DIR)
	@echo "Generate $@ done."
	
.c.o:
	$(CC) -c $^ -o $@ $(CFLAGS)
	
.s.o:
	$(CC) -c $^ -o $@ $(CFLAGS)	
	
.PHONY: clean
	
clean:
	@rm -f $(OBJS)
	@rm -f $(ASM_OBJS)	